package nl.aronmandos.myhealth.bll;

import nl.aronmandos.myhealth.dal.ExampleDAL;
import nl.aronmandos.myhealth.domain.Example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ContextConfiguration;

import java.util.List;

/**
 * An example logic class
 *
 * Created by Aron on 17-9-2014.
 */

@Component
public class ExampleBLL {
    @Autowired
    private ExampleDAL exampleDAL;


    /**
     * gets an example by id
     *
     * @param id the id of the wanted example
     * @return an Example
     */
    public Example getExample(int id) {
        //TODO authorize
        //TODO validate any input
        return exampleDAL.getExample(id);
    }

    public List<Example> getExamples() {
        return exampleDAL.getExamples();
    }
}
